/* 
 * @Author:  
 * @Date: 2025-06-30 10:32:17 
 * @LastEditor: zhuxiaoyi 
 * @LastEditTime: 2025-08-31 15:15:36
 * @Description:  
 */
import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';

// 土含与蒸散发反演成果实体
@Entity('soil_et_result')
export class SoilEtResult {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ comment: '文件名称' })
  fileName: string;

  @Column({ type: 'date', comment: '监测日期' })
  monitorDate: Date;

  @Column({ comment: '所属灌区' })
  irrigationArea: string;

  @Column({ comment: '成果类型' })
  resultType: string;

  @Column({ type: 'text', nullable: true, comment: 'box坐标' })
  box: string;

  @Column({ comment: '文件路径' })
  filePath: string;

  @Column({ type: 'uuid', comment: 'CSV文件ID', nullable: true })
  //新增的字段
  csvFileId: string;

  @Column({ comment: '土壤水类型' , nullable: true })
  soilWaterType: string;

  @Column({ comment: 'ET类型', nullable: true  })
  etType: string;

  @CreateDateColumn({ comment: '创建时间' })
  createTime: Date;
}

// CSV文件实体      
@Entity('csv_file')  //新增的实体
export class CsvFile {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column({ comment: '原始文件名' })
  originalName: string;

  @Column({ comment: '文件路径' })
  filePath: string;

  @Column({ type: 'bigint', comment: '文件大小' })
  fileSize: number;

  @CreateDateColumn({ comment: '上传时间' })
  createTime: Date;
}